<?php

    // TITLE: Account Preferences View
    // FILE: account/view/prefs.php
    // AUTHOR: AUTOGEN

    $pid = $_SESSION['personid'];
    $email = $person->getPrefEmail();
    $mail = $person->getPrefMail();
    $phone = $person->getPrefPhone();
    
?>
<h2>Preferences</h2>
<hr>

<h3>Receive Email?</h3>

<input type="radio" name="mail"id="yes" value="1" <?php echo $email ? 'checked' : ''; ?>>
<label>Yes</label>
<br>
<input type="radio" name="mail"id="no" value="0" <?php echo !$email ? 'checked' : ''; ?>>
<label>No</label>
    
<h3>Receive Mail?</h3>
    
<input type="radio" name="email"id="yes" value="1" <?php echo $mail ? 'checked' : ''; ?>>
<label>Yes</label>
<br>
<input type="radio" name="email"id="no" value="0" <?php echo !$mail ? 'checked' : ''; ?>>
<label>No</label>
    
<h3>Receive Calls?</h3>

<input type="radio" name="calls"id="yes" value="1" <?php echo $phone ? 'checked' : ''; ?>>
<label>Yes</label>
<br>
<input type="radio" name="calls"id="no" value="0" <?php echo !$phone ? 'checked' : ''; ?>>
<label>No</label>

<br>
<button type="update" onclick="godo();">Update</button>

<hr>
<h5>
 Update your preferred methods of contact for Habitat for Humanity
</h5>
<!--<span class="note">
    Update your contact preferences here. <br>
    Email may still be used in case you forget your password and start an account recovery.
</span> -->
